package com.toonyoo.eurekaproducer.rocketmq;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.context.annotation.Configuration;

@Configuration
@Slf4j
public class RabbitConfig {

    public RabbitConfig(RabbitTemplate rabbitTemplate) {
        rabbitTemplate.setConfirmCallback((correlationData, ack, cause) -> log.info("发送消息确认 ==== 【"+correlationData+"】【"+ack+"】【"+cause+"】"));
    }

}
